import qrcode

# 创建二维码对象
qr = qrcode.QRCode(
version=1,
error_correction=qrcode.constants.ERROR_CORRECT_L,
box_size=10,
border=4,
)

# 添加数据
qr.add_data("https://pics4.baidu.com/feed/902397dda144ad3401fdf8a55aec4dfb31ad852b.jpeg@f_auto?token=0b1af825e122ae4a0f022d417f52b523")
qr.make(fit=True)

# 生成图像
img = qr.make_image(fill_color="black", back_color="white")
img.save("Mother.png")
